namespace BaseForum.Model
{
    public class User : ObjectIdentity
    {
        public const int UserNormal = 1;
        public const int UserDoctor = 2;
        public const int UserAdmin = 3;
       
        private string _location;
        private string _name;
        private bool _privateInfo;
        private int _type;
        private string _userName;
        private string _password;
        private int _age;
        private string _email;


        public User()
        {
        }
        public User(int id)
        {
            this.Id = id;
        }

        public User(User user)
        {
           SetUser(user);
        }
        public void SetUser(User user)
        {
            this.Location = user.Location;
            this.Name = user.Name;
            this.PrivateInfo = user.PrivateInfo;
            this.Type = user.Type;
            this.UserName = user.UserName;
            this.Password = user.Password;
            this.Age = user.Age;
            this.Email = user.Email;
        }

        public int Type
        {
            get { return _type; }
            set { _type = value; }
        }

        public string UserName
        {
            get { return _userName; }
            set { _userName = value; }
        }

        public string Password
        {
            get { return _password; }
            set { _password = value; }
        }
        public string Name
        {
            get { return _name; }
            set { _name = value; }
        }

        public int Age
        {
            get { return _age; }
            set { _age = value; }
        }

        public string Location
        {
            get { return _location; }
            set { _location = value; }
        }

        public string Email
        {
            get { return _email; }
            set { _email = value; }
        }

        public bool PrivateInfo
        {
            get { return _privateInfo; }
            set { _privateInfo = value; }
        }
    }
}